home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / str2bmp / test.bas < prev    next >
BASIC Source File  |  1995-09-06  |  1KB  |  27 lines

  1. Option Explicit
  2.    
  3.  
  4. ' Bitmap to string functions...
  5. Declare Function BMPToString Lib "str2bmp.dll" (ByVal hDC%, ByVal img%, ByVal a$) As Long
  6. Declare Function BMP_GetSize Lib "str2bmp.dll" (ByVal img%) As Long
  7. Declare Function BMP_GetWidth Lib "str2bmp.dll" (ByVal img%) As Integer
  8. Declare Function BMP_GetHeight Lib "str2bmp.dll" (ByVal img%) As Integer
  9.  
  10. ' Bitmap handling functions.
  11. Declare Function StringToBmp Lib "str2bmp.dll" (ByVal a$, ByVal hDC%, ByVal img%) As Long
  12.  
  13. ' Functions for operating on bitmaps stored as strings.
  14. Declare Function StringBMP_GetWidth Lib "str2bmp.dll" (ByVal a$) As Integer
  15. Declare Function StringBMP_GetHeight Lib "str2bmp.dll" (ByVal a$) As Integer
  16. Declare Function StringBMP_Compare Lib "str2bmp.dll" (ByVal a$, ByVal b$) As Long
  17. Declare Function StringBMP_Invert Lib "str2bmp.dll" (ByVal a$, ByVal r$) As Long
  18. Declare Function StringBMP_Or Lib "str2bmp.dll" (ByVal a$, ByVal b$, ByVal r$) As Long
  19. Declare Function StringBMP_and Lib "str2bmp.dll" (ByVal a$, ByVal b$, ByVal r$) As Long
  20.  
  21. Sub MakePicture (a$, p As PictureBox)
  22.   Dim ret As Long
  23.   ret = StringToBmp(a$, p.hDC, p.Image)
  24.   If (ret < 0) Then Stop
  25. End Sub
  26.  
  27.